home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / or_bits < prev    next >
Text File  |  2001-04-06  |  744b  |  23 lines

  1. SYNOPSIS
  2.         string or_bits (string str1, string str2)
  3.  
  4. DESTRIPTION
  5.         <str1> and <str2> are both bitstrings. The result of the function
  6.         is a bitstring with the binary-or of <str1> and <str2>,
  7.         ie. a string in which a bit is set if the corresponding
  8.         bit in <str1> or <str2> (or both) is set.
  9.  
  10. EXAMPLES
  11.         string s1, s2, s3;
  12.  
  13.         s1 = set_bit("", 3); s1 = set_bit(s1, 15);  -> s1 is "( ("
  14.         s2 = set_bit("", 3); s2 = set_bit(s2, 4);   -> s2 is "8"
  15.  
  16.         s3 = or_bits(s1, s2);
  17.  
  18.         -> s3 is now "8 (", ie. a bitstring with bits 3, 4 and 15 set.
  19.  
  20. SEE ALSO
  21.         clear_bit(E), set_bit(E), test_bit(E), next_bit(E), last_bit(E),
  22.         count_bits(E), and_bits(E), xor_bits(E), invert_bits(E)
  23.